//
//  DDCalendarTableViewCell.m
//  ialone
//
//  Created by 陆翀 on 16/1/12.
//  Copyright © 2016年 JasperSong. All rights reserved.
//

#import "DDCalendarTableViewCell.h"
#import "UIImageView+WebCache.h"
@implementation DDCalendarTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _date = [[UIImageView alloc]initWithFrame:CGRectMake(3*kLMarge, 8*kLMarge-64, 6*kLMarge, 3*kLMarge)];
        
        [self.contentView addSubview:_date];
        
        _icon = [[UIImageView alloc]initWithFrame:CGRectMake(kScreenWidth-6*kLMarge, 8*kLMarge-64, 3*kLMarge, 3*kLMarge)];
        [self.contentView addSubview:_icon];
        
        _imagev = [[UIImageView alloc]initWithFrame:CGRectMake(3*kLMarge, kScreenHeight/5-64, kScreenWidth-6*kLMarge, kScreenHeight/5*4 - 3*kLMarge)];
        [self.contentView addSubview:_imagev];
    }
    return self;
}
-(void)setModel:(DDCalendarModel *)model
{
    _model = model;
    

    [_imagev sd_setImageWithURL:[NSURL URLWithString:model.thumbnail]];
    [_date sd_setImageWithURL:[NSURL URLWithString:model.bookmark_lunar]];
    _icon.image = [UIImage imageNamed:@"goin_button@2x"];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
